package com.health.dao;

import com.health.pojo.Setmeal;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Classname SetmealDao
 * @Description TODO
 * @Version 1.0.0
 * @Date 2023/3/16 14:47
 * @Author RainGrd
 */
public interface SetmealDao {


    int insertSetmeal(Setmeal setmeal);

    long selectSetmealAndCheckGroupRelation(long id);

    int insertSetmealAndCheckGroup(@Param("checkgroup_id") Integer checkGroupId, @Param("setmeal_id") Integer setmealId);


    List<Setmeal> selectByCondition(@Param("queryString") String queryString);


    long selectTotalByCondition(@Param("queryString") String queryString);

    List<Map<String, Object>> querySetmealCount();


    Setmeal selectSetmealById(Integer setmealId);

    List<Setmeal> selectAll();

    String findSetmealNameById(Integer id);

    int updateSetmeal(Setmeal setmeal);

    List<Integer> selectCheckGroupIdsBySetmealId(@Param("setmealId") Integer setmealId);

    void deleteAssociation(@Param("setmeal_id") Integer id);

    int deleteSetmeal(@Param("id") Integer id);
}
